//
//  QQMiniGameLoginDefine.h
//  QQMiniGameLogin
//
//  Created by guoyanshi on 2023/5/22.
//  Copyright © 2023 tencent. All rights reserved.

#ifndef QQMiniGameLoginDefine_h
#define QQMiniGameLoginDefine_h
NS_ASSUME_NONNULL_BEGIN
/// 登录类型
typedef NS_ENUM(NSInteger, QQMiniGameLoginType) {
    QQMiniGameLoginUnknown = 0,
    QQMiniGameLoginQQ,
    QQMiniGameLoginWX,
};

FOUNDATION_EXPORT NSErrorDomain const QQMiniGameLoginErrorDomain;       //错误域名
UIKIT_EXTERN NSNotificationName const QQMiniGameLoginSuccssNotication;  //登录成功通知
UIKIT_EXTERN NSNotificationName const QQMiniGameLogoutNotication;       //退出登录通知

/// 登录错误码
typedef NS_ENUM(NSInteger, QQMiniGameLoginErrorCode) {
    QQMiniGameLoginErrorUnknown = 1,
    QQMiniGameLoginErrorNoImplement,        //接口未实现
    QQMiniGameLoginErrorSendFail,           //发送请求失败
    QQMiniGameLoginErrorRspFail,            //回包失败
    QQMiniGameLoginErrorNoNetwork,          //无网络失败
    QQMiniGameLoginErrorReqTokenFail,       //请求token接口失败
};

typedef void(^QQMiniGameLoginComplete) (NSError * _Nullable error, QQMiniGameLoginType type);
typedef void(^QQMiniGameLogoutComplete) (void);

NS_ASSUME_NONNULL_END

#endif /* QQMiniGameLoginDefine_h */
